﻿using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugar;
namespace zhwy.saas.api.Entity.Sys
{
    /// <summary>
    /// 系统菜单信息表
    ///</summary>
    [SugarTable("menus")]
    public class MenusEntity: BaseEntity
    {
        /// <summary>
        /// 子集
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<MenusEntity> Children { get; set; }

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "pid")]
        public int Pid { get; set; }

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "name")]
        public string Name { get; set; } = null!;

        /// <summary>
        /// 备  注:类型：目录/菜单/按钮('DIR', 'MENU', 'BUTTON')
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "menu_type")]
        public string Menu_type { get; set; } = null!;

        /// <summary>
        /// 备  注:路由路径（如/system/user）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "path")]
        public string? Path { get; set; }

        /// <summary>
        /// 备  注:对应前端组件路径（如@/views/system/user.vue）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "component")]
        public string? Component { get; set; }

        /// <summary>
        /// 备  注:关联权限编码（需与权限表permissions.perm_code一致）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "perm_code")]
        public string? Perm_code { get; set; }

        /// <summary>
        /// 备  注:图标类名（如Element Plus的el-icon-menu）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "icon")]
        public string? Icon { get; set; }

        /// <summary>
        /// 备  注:显示顺序（数字越小越靠前）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "sort")]
        public int? Sort { get; set; }

        /// <summary>
        /// 备  注:是否外部链接（1是则点击菜单会跳转外链）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "is_external")]
        public bool? Is_external { get; set; }

        /// <summary>
        /// 备  注:状态（0启用，1禁用，9删除）
        /// 默认值:
        ///</summary>
        [SugarColumn(ColumnName = "status")]
        public int Status { get; set; }



    }

}